Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: ui_configure: Add completer for 'configure schema' command #1677

Merged

Conversation

liangxin1300
Copy link
Collaborator

To complete existing pacemaker-*.rng files under /usr/share/pacemaker directory

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 27.27273% with 16 lines in your changes missing coverage. Please review.

Project coverage is 69.72%. Comparing base (7601cb1) to head (6d1afa8).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
crmsh/ui_configure.py 26.66% 11 Missing ⚠️
crmsh/command.py 28.57% 5 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
integration 53.53% <27.27%> (-0.02%) ⬇️
unit 53.09% <27.27%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crmsh/command.py 62.11% <28.57%> (-0.39%) ⬇️
crmsh/ui_configure.py 44.83% <26.66%> (-0.22%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@liangxin1300 liangxin1300 marked this pull request as ready for review February 5, 2025 02:45
@liangxin1300 liangxin1300 force-pushed the 20250127_schema_completer branch from bf0e695 to 63589a7 Compare February 5, 2025 12:19
@liangxin1300 liangxin1300 requested a review from zzhou1 February 5, 2025 12:20
def schema_completer():
exclude_files = ['pacemaker-next.rng']
files = glob.glob(os.path.join('/usr/share/pacemaker/', 'pacemaker-*.rng'))
files = [f for f in files if os.path.basename(f) not in exclude_files]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    files = [f for f in files if os.path.basename(f) not in exclude_files]
    files.sort()

@liangxin1300 liangxin1300 force-pushed the 20250127_schema_completer branch 2 times, most recently from 59fabde to 4191083 Compare February 8, 2025 00:33
To complete existing pacemaker-*.rng files under /usr/share/pacemaker
directory
Added `enable_custom_sort_order` and `disable_custom_sort_order`
functions to encapsulate the logic for modifying `rl_sort_completion_matches`.
@liangxin1300 liangxin1300 force-pushed the 20250127_schema_completer branch from 4191083 to 6d1afa8 Compare February 8, 2025 00:37
Copy link
Contributor

@zzhou1 zzhou1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, Thx!

@liangxin1300 liangxin1300 merged commit 0b368d3 into ClusterLabs:master Feb 8, 2025
31 of 32 checks passed
liangxin1300 added a commit that referenced this pull request Feb 8, 2025
…ommand (#1678)

To complete existing pacemaker-*.rng files under /usr/share/pacemaker
directory
backport #1677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants